
from tornado.database import Connection
from tornado.options import options

from db import conn

def connect():
	conn.mysql = Connection(
            host    = options.mysql["host"]+":"+options.mysql["port"],
		    database = options.mysql["database"],
		    user    = options.mysql["user"],
		    password = options.mysql["password"],
		    max_idle_time = 5
	)
